package com.yunwei.http;

import com.squareup.okhttp.Interceptor;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;

import java.io.IOException;

/**
 * Created by weijianxing on 10/5/15.
 */
public class MyOkHttpInterceptor implements Interceptor {

    @Override
    public Response intercept(Chain chain) throws IOException {
        Request originalRequest = chain.request();
        Request newRequest =
                originalRequest.newBuilder().header("mytoken", "token").build();

        return chain.proceed(newRequest);
    }
}
